//装备 组件 头部 无路由页面
const Header = resolve => {
    require.ensure(['components/Header.vue'], () => {
        resolve(require('components/Header.vue'));
    }, 'Home');
};
//装备 父组件 无实际显示路由页面
const Equipment = resolve => {
    require.ensure([], () => {
        resolve(require('components/equipment/Equipment.vue'));
    }, 'equipment');
}
//装备 装备详情页面
const EquipmentList = resolve => {
    require.ensure([], () => {
        resolve(require('components/choice/EquipmentList.vue'));
    }, 'equipment');
}

const EquipmentDetail = resolve => {
    require.ensure([], () => {
        resolve(require('components/equipment/EquipmentDetail.vue'));
    }, 'equipment');
}
//装备 装备下单页面
const EquipmentOrder = resolve => {
    require.ensure([], () => {
        resolve(require('components/equipment/EquipmentOrder.vue'));
    }, 'equipment');
}
//装备 装备手游下单页面 未用到
const EquipmentMOrder = resolve => {
    require.ensure([], () => {
        resolve(require('components/equipment/EquipmentMOrder.vue'));
    }, 'equipment');
}
//装备 装备搜索 作为组件了 路由未用到 但是vue作为组件使用了
const EquipmentSearch = resolve => {
    require.ensure([], () => {
        resolve(require('components/choice/EquipmentSearch.vue'));
    }, 'equipment');
}





export const equipmentRoute =

    {
        path: '/vue/equipment',
        components: {
            default: Equipment,
        },
        children: [
            {
                path: '/vue/equipmentList/:gameId/:gameName/:goodsType',
                name:'EquipmentList',
                components: {
                    default: EquipmentList
                }
            },
            {
                path: 'equipmentDetail/:goodsId/:goods_source_type/:gameType',
                name:'equipmentDetail',
                components: {
                    default: EquipmentDetail,
                    'equipment-header': Header
                }
            },
            {
                path: 'equipmentOrder/:goodsId/:goods_source_type',
                name:'equipmentOrder',
                components: {
                    default: EquipmentOrder
                },
                meta: {isPublish: true, requireAuth: true}
            },
            {
                path: 'equipmentMOrder/:goodsId/:goods_source_type',
                name:'equipmentMOrder',
                components: {
                    default: EquipmentMOrder
                },
                meta: {isPublish: true, requireAuth: true}
            },
            {
                path: 'equipmentSearch',
                name:'equipmentSearch',
                components: {
                    default: EquipmentSearch
                },
                meta: {isPublish: true, requireAuth: false}
            },
            {
                path: 'equipmentDetailApp/:goodsId/:goods_source_type/:gameType',
                name:'equipmentDetailApp',
                components: {
                    default: EquipmentDetail,
                }
            },

        ],
        meta: {isPublish: true, requireAuth: false}
    };
